<?php
/*
*	专题顶部活动列表
*/
	$taxonomy = 'topic';
	$items_detail=get_the_terms($post->ID,$taxonomy);
	$parent_detail =$items_detail[0];
	$term_id = $parent_detail->term_id;
	$parent_id = $taxonomy . '_' . $term_id;
	$special_ad_list = get_field('ad_list',$parent_id);
	if(get_field('special_ad') && $special_ad_list){
?>

<div class="zixun-wrap" id="zixun-wrap">
	<div class="zixun_box">
	  <div class="fl_img"><img src="<?php echo get_template_directory_uri(); ?>/images/pengairedian.png"  alt="" /></div>
	  <div class="DisCountText">
	    <div class="swiper-container UpList">
	      <div class="swiper-wrapper">
	      		<?php
	      			foreach ($special_ad_list as $key => $special_ad) {
	      				$url = $special_ad['url']?$special_ad['url']:'javascript:void(0);" onclick="onKST(\'顶部活动\');"';
	      		?>
		        <div class="swiper-slide Discounttitle">
				  <a href="<?php echo $url;?>">
			          <div class="word_price"><img src="<?php echo get_template_directory_uri(); ?>/images/xiaolaba.gif" alt="" /><?php echo $special_ad['title']; ?></div>
			          <p><?php echo $special_ad['description']; ?></p>
				  </a>
		        </div>
		        <?php
		        	}
		        ?>
	        </div>
	    </div>
	  </div>
	  <div class="both"></div>
	</div>
</div>
<?php
	}
?>